<template>
  <div class="demo">
    <h1>h1</h1>
    <Suspense>
        <template v-slot:default>
            <Com />
        </template>
        <template v-slot:fallback>
            <h2>
                loading
            </h2>
        </template>
    </Suspense>
  
  </div>
</template>

<script>
import { reactive, toRefs, defineAsyncComponent } from "vue";
const Com = defineAsyncComponent(() => import("./Children.vue"));
export default {
  name: "demo",
  components: {
    Com,
  },
  setup(props) {
    const state = reactive({});
    return {
      ...toRefs(state),
    };
  },
};
</script>

<style lang='scss' scoped>
</style>
